<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCategoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('category', function (Blueprint $table) {
            $table->increments('id');
            $table->string('catname') -> nullable() -> comment('文章分类标题');
            $table->string('pid') -> comment('父id拼path路径');
            $table->string('path') -> comment('父类的path路径');
            // $table->string('description') -> nullable() -> comment('文章描述');
            // $table->string('article') -> nullable() -> comment('文章内容');
            // $table->string('capacity') -> nullable() -> comment('文章访问量');
            // $table->string('order') -> nullable() -> comment('文章的访问量');
            // $table->string('auditing') -> default('1') -> comment('发表状态1待核2审过');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('category');
    }
}
